% Generic macros (nothing specific to this paper)
%
\newcommand{\writer}[2][]{{\textbf{#1: #2}}}
\newcommand{\mwriter}[2][]{{\marginpar{\color{magenta} #1: #2}}}
%\newcommand{\mwriter}[2][]{}

\newcommand{\mrama}[1]{\mwriter[rama]{#1}}
\newcommand{\rama}[1]{\writer[rama]{#1}}
\newcommand{\mkapil}[1]{\mwriter[Kapil]{#1}}

\newcommand{\LineFill}{\mbox{} \hrulefill \mbox{}}
%\newcommand{\TODO}[1]{ {\bf #1} }
\newcommand{\COMMENT}[1]{}
% \newcommand{\TODO}[2][]{ {\color{blue}{#1}} \marginpar{\textbf{TODO}} {\color{red}{#2}}}
\newcommand{\TODO}[1]{\marginpar{\textbf{TODO: #1}}}

%% \newcommand{\added}[1]{{\color{blue}{#1}}}
%% \newcommand{\changed}[1]{{\color{green}{#1}}}
%% \newcommand{\deleted}[1]{{\color{red}{#1}}}
\newcommand{\added}[1]{{#1}}
\newcommand{\changed}[1]{{#1}}
\newcommand{\deleted}[1]{}

\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand {\etal} {{\it et al.}}

%%% references definition
\newcommand{\lemref}[1]{Lemma~\ref{Lm:#1}}
\newcommand{\figref}[1]{Fig.~\ref{Fi:#1}}
\newcommand{\defref}[1]{Definition~\ref{De:#1}}
\newcommand{\tableref}[1]{Table~\ref{Ta:#1}}
\newcommand{\sectionref}[1]{Section~\ref{Se:#1}}

%\newtheorem{example}{Example}
% \newtheorem{lemma}{Lemma}
% \newtheorem{theorem}{Theorem}
% \newtheorem{definition}{Definition}

%\newtheorem{conjecture}{Conjecture}
%\newtheorem{lemma}{Lemma}

% \newenvironment {proof} {\noindent{\bf Proof} }{\ \\}

\newcounter{programlinenumber}
\newcommand{\nl}{\addtocounter{programlinenumber}{1}[\arabic{programlinenumber}] \> }
\newenvironment{myprogram}
     {\tt \small%
       \begin{tabbing}%
       123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=\kill%
       \setcounter{programlinenumber}{0}%
     }
     {\end{tabbing}}

\newcommand{\codefragment}[2]{
   \begin{minipage}{#1}
   \begin{tabbing}
       12\=12\=12\=12\=12\=12\=123\=123\=123\=123\=123\=123\=\kill%
   #2
   \end{tabbing}
   \end{minipage}
}

%%% sectioning

%% if statement
\newcommand{\ifthen}[3]{
 \left\{
      \begin{array}{ll}
        #2 & #1 \\
        #3 & {\rm otherwise}
      \end{array}
      \right.
 }

%% General macros
\newcommand{\ttsub}[2]{${\tt {#1}}_{#2}$}
\newcommand{\mttsub}[2]{{\tt {#1}}_{#2}}

%% tminus: "thin minus", with less space around it;
%% telem: "thin element"
\newcommand{\tminus}{\!\! - \!\!}
\newcommand{\telem}{\! \in \!}

%% stexttt: "small" texttt
\newcommand{\stexttt}[1]{{\small \texttt{#1}}}
\newcommand{\ssc}[1]{{\small \sc{#1}}}

\newcommand{\code}[1]{{\texttt{#1}}}
\newcommand{\qcode}[1]{``\code{#1}''}

\newcommand{\mathify}[1]{\mathord{\mbox{#1}}}

\newcommand{\twoarray[2]}{\begin{array}{l}  #1 \\ #2 \end{array}}
\newcommand{\subsubsubsection}[1]{\emph{#1}:}

\newcommand{\lt}{$<$}
\newcommand{\gt}{$>$}
\newcommand{\tuple}[1]{\langle {#1} \rangle}
% \newcommand{\implies}{\Rightarrow}
\newcommand{\bottom}{\perp}

\newcommand{\Set}[1]{\{ \; {#1} \; \}}
\newcommand{\emptySet}{\{\}}
\newcommand{\vbar}{\; | \;}
\newcommand{\vvbar}{\;\; | \;\;}
\newcommand{\notIn}{\not\in}

\newcommand{\sizeof}[1]{\mbox{$|${#1}$|$}}
\newcommand{\lsyn}{\lbrack\!\lbrack}
\newcommand{\rsyn}{\rbrack\!\rbrack}

\newcommand{\squishlist}{
   \begin{list}{$\bullet$}
    { \setlength{\itemsep}{0pt}      \setlength{\parsep}{3pt}
      \setlength{\topsep}{3pt}       \setlength{\partopsep}{0pt}
      \setlength{\leftmargin}{1.5em} \setlength{\labelwidth}{1em}
      \setlength{\labelsep}{0.5em} } }

\newcommand{\squishlisttwo}{
   \begin{list}{$\bullet$}
    { \setlength{\itemsep}{0pt}    \setlength{\parsep}{0pt}
      \setlength{\topsep}{0pt}     \setlength{\partopsep}{0pt}
      \setlength{\leftmargin}{2em} \setlength{\labelwidth}{1.5em}
      \setlength{\labelsep}{0.5em} } }

\newcommand{\squishend}{
    \end{list}  }

\newcommand{\modulus}[1]{\vbar #1 \vbar}
\newcommand{\mypara}[1]{\textbf{#1}}
\newcommand{\powerset}[1]{\mathit{2^{#1}}}
\newcommand{\partmap}{\hookrightarrow}
\newcommand{\sembrack}[1]{[\![#1]\!]}

% \syn: a syntactic category
\newcommand{\syn}[1]{\mathit{#1}}
\newcommand{\lfp}[1]{\mathit{lfp}^{#1}}